package com.dkd.sbtz.domain.vo.spare;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;

@Data
public class SpareBatchDTO {
    @NotBlank(message = "编码(code)不能为空")
    private String code;
    @NotBlank(message = "名称(name)不能为空")
    private String name;

    private String unit;
    private Integer type;
    private Integer status;
    private Long stockTotal;
    private Long stockAvailable;
    private String remark;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date planDate;

    private Integer orderDate;

    private List<SpareVariantItem> variants;

    @Data
    public static class SpareVariantItem {
        private String spec;
        private String vendor;
        private Integer status; // 可不传，默认沿用主记录status
    }
}
